package com.bristua.mall.order.controller;

import com.bristua.mall.common.bean.Result;
import com.bristua.mall.common.utils.HandleResultUtil;
import com.bristua.mall.order.biz.UpdateOrderStatusBiz;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/4/29.
 */
@RestController
@Api(value="修改订单状态",tags={"修改订单状态"})
public class UpdateOrderStatusController {
    @Autowired
    private UpdateOrderStatusBiz updateOrderStatusBiz;
    @PostMapping(value="/change/order/status/{orderId}/{status}")
    @ApiOperation(value="修改订单状态")
    public Result updateOrderStatus(@PathVariable(value = "orderId") String orderId,@PathVariable(value = "status") String status){
        updateOrderStatusBiz.updateOrderStatus(orderId,status);
        return HandleResultUtil.updateSuccessResult();
    }
}
